libxl: provide xlutil.pc
authorWei Liu <wei.liu2@citrix.com>
Tue, 20 Jan 2015 12:22:50 +0000 (12:22 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 27 Jan 2015 16:34:05 +0000 (16:34 +0000)
Please rerun autogen.sh after applying this patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
.gitignore
tools/configure.ac
tools/libxl/Makefile
tools/libxl/xlutil.pc.in.in [new file with mode: 0644]

index 33c2ca0293e2ed46ced3b12a1d06b3c386c7d56b..13ee05b919c9d8c48dc5cc7db57036eec9d1561c 100644 (file)
@@ -153,8 +153,8 @@ tools/include/xen/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
 tools/libxl/libxlu_cfg_y.output
-tools/libxl/xenlight.pc
-tools/libxl/xenlight.pc.in
+tools/libxl/*.pc
+tools/libxl/*.pc.in
 tools/libxl/xl
 tools/libxl/testenum
 tools/libxl/testenum.c
index 113285d269d6d8d06cf5e50d65c723bad0158475..1ecc216c9ccd4444a3b3a50b093406b70faa41b3 100644 (file)
@@ -28,6 +28,7 @@ hotplug/Linux/xen-hotplug-common.sh
 hotplug/Linux/xendomains
 hotplug/NetBSD/rc.d/xencommons
 libxl/xenlight.pc.in
+libxl/xlutil.pc.in
 ])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([../])
index bb19802443097f746ffe952df5da72ce136e7139..5df49703d29155fff781e8d5220b27e428ddb7fd 100644 (file)
@@ -143,7 +143,7 @@ $(XEN_INIT_DOM0_OBJS): CFLAGS += $(CFLAGS_libxenstore)
 SAVE_HELPER_OBJS = libxl_save_helper.o _libxl_save_msgs_helper.o
 $(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl)
 
-PKG_CONFIG = xenlight.pc
+PKG_CONFIG = xenlight.pc xlutil.pc
 
 testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight)
 testidl.c: libxl_types.idl gentest.py libxl.h $(AUTOINCS)
@@ -250,8 +250,8 @@ libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so
 testidl: testidl.o libxlutil.so libxenlight.so
        $(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
-xenlight.pc: xenlight.pc.in Makefile
-       @sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < xenlight.pc.in > $@.new
+$(PKG_CONFIG): %.in : Makefile
+       @sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < $@.in > $@.new
        @mv -f $@.new $@
 
 .PHONY: install
@@ -276,6 +276,7 @@ install: all
        $(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(INCLUDEDIR)
        $(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
        $(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
+       $(INSTALL_DATA) xlutil.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
 
 .PHONY: clean
 clean:
@@ -283,9 +284,10 @@ clean:
        $(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
        $(RM) -f testidl.c.new testidl.c *.api-ok
        $(RM) -f xenlight.pc
+       $(RM) -f xlutil.pc
 
 distclean: clean
-       $(RM) -f xenlight.pc.in
+       $(RM) -f xenlight.pc.in xlutil.pc.in
 
 realclean: distclean
        $(RM) -f $(AUTOSRCS) $(AUTOINCS)
diff --git a/tools/libxl/xlutil.pc.in.in b/tools/libxl/xlutil.pc.in.in
new file mode 100644 (file)
index 0000000..e7dc14d
--- /dev/null
@@ -0,0 +1,9 @@
+prefix=@prefix@
+includedir=@includedir@
+libdir=@libdir@
+
+Name: Xlutil
+Description: The xl utility library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lxlutil